package com.hzw.saas.web.shell.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.messaging.SessionUnsubscribeEvent;
import lombok.extern.slf4j.Slf4j;

/**
 * <p>
 *   在收到新的STOMP UNSUBSCRIBE时发布。
 * </p>
 *
 * @author sonam
 * @since 2021/5/21 16:56
 */
@Slf4j
@Component
public class SessionUnsubscribeListener implements ApplicationListener<SessionUnsubscribeEvent> {

    @Override
    public void onApplicationEvent(SessionUnsubscribeEvent event) {
        log.info(event.getUser().getName() + "取消订阅接口");
    }

}
